<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@include file="common/header.jsp"%>
<link href="${ctx}/static/css/ui-lightness/jquery-ui-1.10.0.custom.min.css" rel="stylesheet" type="text/css"/>
<shiro:authenticated>
    <script type="text/javascript" src="${ctx}/static/00100/javascripts/gopay/acct/acctSel.js"></script>
</shiro:authenticated>
<script type="text/javascript" src="${ctx}/javascripts/00100/index.js"></script>
<script type="text/javascript">
    var ctx='${ctx}';
    var cashier_url = '${cashier_url}';
    var cas_server_url = '${cas_server_url}';
    var enable_fingerinfo = '${enable_fingerinfo}';
    var orderId = '<%=request.getParameter("orderId")%>';
    var orderKey = '<%=request.getParameter("orderKey")%>';
</script>
<input type="hidden" name="isFirstLogin" id="isFirstLogin" value="${isFirstLogin}"/>
<input type="hidden" id="login" name="login" value="${login }"/>
<input type="hidden" id="orderIntTxnCd" name="orderIntTxnCd" value="${order.intTxnCd }"/>
<div class="container">
    <div class="grid-960">
    	<!-- 提示信息	add by jiaoshuai 20160909 -->
    	<div class="reminder" style="font-size: 12px;color: #818181;margin-bottom: 10px;letter-spacing: -0.2px;vertical-align: middle;height: 16px;line-height: 16px;">
            <span style="display: inline-block;width: 14px;height: 14px;"><img
                    src="${ctx}/static/00100/images/i.png" alt=""></span> 尊敬的用户，因近期电信诈骗类案件频发，有不法分子冒充银行、公检法、企业老板等方式进行诈骗。国付宝提醒您：请予付款前再次核对付款信息及用途，以避免造成资金损失。
        </div>
        <!-- 支付订单详情 -->
        <jsp:include page="content/orderDtl.jsp" flush="true"/>

<%--        <c:if test="${!empty err_msg }">
            <div class="backgroundBox-3" id="errorShowDiv">
                <span class="red">${err_msg }</span>
                <img class="close" src="${ctx}/static/img/close.png" id="closeOper"/>
            </div>
        </c:if>--%>
        <div class="payment-mode">
            <shiro:authenticated>
            	<c:if test="${isRealNameCertify eq '1'}">
                    <h5>国付宝帐户支付：</h5>
                    <table class="table-tml-4" <c:if test="${personTypeQuota != null or dailyUsedQuata != null}"> style='margin-bottom:0px;' </c:if> >
                        <tbody>
                        <tr>
                            <td class="posiRelative">
                                <input type="radio"  id="yesAvalPay" name="yesAvalPay"  <c:if test="${personTypeQuota != null or dailyUsedQuata != null}"> disabled </c:if>onclick="avalPayCheck(${order.merTxnAmt},this);" style='display: <c:if test="${avaAmt2 lt order.merTxnAmt}">none</c:if>'/>
                                <input type="checkbox" id="noAvalPay"   name="noAvalPay" <c:if test="${avaAmt2 eq 0 or personTypeQuota != null or dailyUsedQuata != null or avaAmt2 lt order.merTxnAmt}">disabled</c:if> onclick="avalPayCheck(${order.merTxnAmt},this);" style='display: <c:if test="${!(avaAmt2 lt order.merTxnAmt)}">none</c:if>'/>
                                国付宝可用余额：<span id="avaAmtSpan">${avaAmt }</span>元
                                <div style="left: 50px;display: none" class="tips-12"  id="avalPayTip"></div>
                            </td>
                            <td>客户名称：${custName }</td>
                            <td>国付宝账户：
                                <c:if test="${fn:length(acctIds) eq 1}">
                                    <c:forEach items="${acctIds}" var="acct" >
                                        ${acct.acctId } | ${acct.name }
                                        <input type="hidden" name="gopayAcctIdSel" id="gopayAcctIdSel" value="${acct.acctId }"/>
                                    </c:forEach>
                                </c:if>
                                <c:if test="${fn:length(acctIds) gt 1}">
                                    <select class="width200" id="gopayAcctIdSel" name="gopayAcctIdSel" onchange="getAvaAmtByAcctId(this,${order.merTxnAmt});">
                                        <c:forEach items="${acctIds}" var="acct" >
                                            <option value="${acct.acctId }">${acct.acctId } | ${acct.name }</option>
                                        </c:forEach>
                                    </select>
                                </c:if>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                    <c:if test="${personTypeQuota != null }">
                    	<span class="tips-12 zoom" id="personTypeQuota" style="position:inherit;"><em style="line-height: 16px;float: left;" >您当前是${personTypeQuota.typeStr}类账户,累计付款额度${personTypeQuota.usedLimit}元,剩余付款可用额度${personTypeQuota.canUseLimit}元</em>
                    	<a href="${ctx}/sec/00100/pay/userQuota.shtml?orderKey=<%=request.getParameter("orderKey")%>&orderId=${orderId}" style="float: left;margin: 1px 0 0 5px;" target="_blank"><i class="icon-tips" style="display: block;"></i></a><br class="clear"/>
                    	</span>
                    </c:if>
                    <c:if test="${dailyUsedQuata != null }">
                    	<span class="tips-12 zoom" id="dailyUsedQuata" style="position:inherit;"><em style="line-height: 16px;float: left;" >当前账户单日付款额度${dailyUsedQuata[0]}元, 剩余可用额度${dailyUsedQuata[1]}元</em>
                    	</span>
                    </c:if>
            	</c:if>
            </shiro:authenticated>
            <!-- 支付渠道 -->
            <jsp:include page="content/payChannel.jsp" flush="true"/>
        </div>
        <shiro:authenticated>
            <c:if test="${payWayBean.isSupport('02') == true}">
                <div id="expressLoginBtnDiv">
                    <button type="button" id="submitLocBtn2"  class="btn-2 marginLeft141" onclick='expressLocationSubmit("1","submitLocBtn2");'>下一步</button>
                </div>
            </c:if>

            <c:if test="${payWayBean.isSupport('16') == true}">
                <div id="scanPayLoginBtnDiv">
                    <button type="button" id="submitLocBtn16"  class="btn-2 marginLeft141" onclick='scanPayNext("submitLocBtn16")'>下一步</button>
                </div>
            </c:if>

            <c:if test="${payWayBean.isSupport('01') == true }">
                <div id="bankLoginBtnDiv">
                    <button type="button" id="bankPayBtn2"  class="btn-2 marginLeft141" onclick='bankPaySubmit("bankPayBtn2");'>下一步</button>
                </div>
            </c:if>
            <c:if test="${!((payWayBean.isSupport('01') == true) or (payWayBean.isSupport('02') == true))}">
                <!--仅余额支付-->
                <form id="gopaySubmitForm2" name="gopaySubmitForm2" action="${ctx}/sec/00100/express/confirm.shtml" method="post">
                    <input type="hidden" name="orderId" id="orderId" value="<%=request.getParameter("orderId")%>"/>
                    <input type="hidden" name="formhash" id="formhash" value="${formhash }"/>
                    <input type="hidden" name="gopayUser" id="gopayUser" value=""/>
                    <input type="hidden" name="pageFrom" value="order"/>
                    <input type="hidden" name="exGopayAcctId" id="exGopayAcctId" value="${gopayAcctId}"/>
                    <input type="hidden" name="exPayWay" id="exPayWay"/>
                    <input type="hidden" name="orderKey" id="orderKey" value="<%=request.getParameter("orderKey")%>"/>
                    <button type="button" id="submitLocBtn3"  class="btn-2 marginLeft141" onclick='gopaySubmit2();'>下一步</button>
                </form>
            </c:if>
            
            
            <script>
			$(function(){
				var len = $('#locationBankFrom #exCardListDiv input[type=radio]:checked').length;
				if (len > 0) {
					$('#locationBankFrom #exCardListDiv input[type=radio]:checked').trigger('click');
				}
			});
			</script>
        </shiro:authenticated>
    </div>
</div>
<input type="hidden" name="loginEmail" id="loginEmail" value="${loginEmail}"/>
<input type="hidden" name="merTxnAmt" id="merTxnAmt" value="${order.merTxnAmt}"/>

<%@include file="common/footer.jsp"%>


<style>
.em2{text-indent:2em;}
.ui-dialog .ui-dialog-title{text-align:center;}
.ui-dialog .ui-dialog-titlebar{background:#eee;border-bottom:1px solid #ddd;}
</style>
<div id="announceDialog" style="display:none;">
<ul>
    <li>尊敬的国付宝用户：</li>
    <li class="em2">您好！</li>
    <li class="em2">为了更好地向您提供合法安全的支付服务，国付宝根据国家相关规定，修改与您之间达成的《国付宝用户注册协议》、《国付宝钱包服务协议》，并将对您的国付宝账户转账功能进行优化管理。协议修改内容可见国付宝官网、手机移动客户端。
    </li>
    <li class="em2">自2016年12月1日起，您的国付宝账户向其他第三方支付机构的支付账户或银行账户的日累计转账限额和笔数将有所限制；超出限额和笔数的，国付宝将不予提供服务。您国付宝账户的限额和笔数具体数值，可联系国付宝的客服中心询问：400-0550-009</li>
    <li class="em2">国付宝持续为您提供合法安全、高效便捷的支付服务，保护您与您账户的合法权益。</li>
   <br>
   <br>
    <li style="text-align:right">国付宝信息科技有限公司</li>
    <li style="text-align:right">2016 年 11月 28日</li>
</ul>
</div>
